[Unit]
Description= PG Exporter @ {{ pg_exporter_port }} for {{ pg_cluster }}-{{ pg_seq }}@{{ pg_host }}:{{ pg_port }}
Documentation=https://github.com/Vonng/pg_exporter
After=network.target

[Service]
EnvironmentFile=-/etc/default/{{ pg_exporter_unit }}
User={{ pg_dbsu }}
ExecStart=/usr/bin/pg_exporter $PG_EXPORTER_OPTS
ExecReload=/usr/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=5s

CPUQuota=10%
MemoryLimit=200M

[Install]
WantedBy=multi-user.target